<?php

 include APPLICATION_PATH ."/modules/admin/services/Dataservices.php";

class c2i_WsController extends Zend_Controller_Action
{
	 
	
    public function indexAction()
    {
    	ob_start();
    	$this->_helper->layout()->disableLayout();
    	$this->_helper->viewRenderer->setNoRender(true);
    	 
    	if(isset($_GET['wsdl'])) {
    		 
    		$autodiscover = new Zend_Soap_AutoDiscover();
    		$autodiscover->setClass('Application_Modules_Admin_Service_Dataservices');
    		 
    		$autodiscover->handle();
    	} else {
    		$confi_webservice=Zend_Registry::get('config');
    		 
    		$soap = new Zend_Soap_Server($confi_webservice->WebServiceGform,array(	
    				'compression'	=>	SOAP_COMPRESSION_ACCEPT,
					'encoding'		=>	'UTF-8'));
    		$soap->setClass('Application_Modules_Admin_Service_Dataservices');
    		$soap->handle();
    	}
    }
}